//
//  NRWCarChooseItemView.h
//  New_Runway
//
//  Created by NewLife on 2018/3/16.
//  Copyright © 2018年 NelsonJ. All rights reserved.
//

#import <UIKit/UIKit.h>

@class NRWCarChooseItemView;

@protocol NRWCarChooseItemViewDelegate<NSObject>

- (void)chooseItemView:(NRWCarChooseItemView *)view itemDidClickWithItem:(UIButton *)sender andItemIndex:(NSInteger)itemIndex;

@end

@interface NRWCarChooseItemView : UIView

- (void)prepare;//设置完所有属性后调用

@property (weak, nonatomic) id<NRWCarChooseItemViewDelegate> delegate;

@property (assign, nonatomic) NSInteger selectIndex;

@property (assign, nonatomic, readonly) CGFloat chooseViewHeight;

/**
 item标题
 */
@property (strong, nonatomic) NSArray<NSString *> *itemTitleArr;

/**
 每一行显示几个item default 3
 */
@property (assign, nonatomic) NSInteger itemNumInRow;

/**
 item高 default 40
 */
@property (assign, nonatomic) CGFloat itemHeight;

/**
 item之间的间距 default 16
 */
@property (assign, nonatomic) CGFloat margin;

/**
 item与父控件左右的间距 default 16
 */
@property (assign, nonatomic) CGFloat marginSides;

/**
 行间距 default 16
 */
@property (assign, nonatomic) CGFloat marginUpDown;

/**
 标题颜色 default 323232
 */
@property (strong, nonatomic) UIColor *titleColor;

/**
 选中标题颜色
 */
@property (strong, nonatomic) UIColor *selectTitleColor;

/**
 标题字体 default kPingFangRegular13
 */
@property (strong, nonatomic) UIFont *titleFont;

/**
 item背景色 default whiteColor
 */
@property (strong, nonatomic) UIColor *itemBackColor;

/**
 选中状态背景颜色
 */
@property (strong, nonatomic) UIColor *itemSelectBackColor;

@property (copy, nonatomic) NSString *normalImage;

@property (copy, nonatomic) NSString *selectImage;

/**
 是否显示边框 default YES
 */
@property (assign, nonatomic) BOOL showBorder;

/**
 边框颜色 default 989898
 */
@property (strong, nonatomic) UIColor *borderColor;

/**
 边框宽度 default 0.5
 */
@property (assign, nonatomic) CGFloat borderWidth;

/**
 圆角 default 0
 */
@property (assign, nonatomic) CGFloat cornerRadius;

@end
